package com.lxn.fallback;

import com.lxn.domain.User;
import com.lxn.feignclients.UserFeignClient;
import org.springframework.stereotype.Component;

//托底类--谁的托底类就实现谁
@Component
public class UserFeignClientFallback implements UserFeignClient{
    @Override
    public User getUserById(Long id) {
        return new User(-1L,"feign:用户服务不可用!");
    }
}
